-- Agregar codigo de moneda en tabla de tasas de interes (cteint) --

alter table cteint
add column codvalmon character varying(8),
add CONSTRAINT gestion_ai_valmoncteint FOREIGN KEY (codvalmon)
    REFERENCES valmon (cod) MATCH SIMPLE
    ON UPDATE NO ACTION ON DELETE RESTRICT;

COMMENT ON COLUMN cteint.codvalmon IS 'Codigo de moneda para la planilla';

update cteint set codvalmon = '$';

alter table cteint
alter column codvalmon set not null;

-- =============================
SELECT aaversion('407.06');
-- =============================